<template>
  <div>
      <!-- 组件生命周期:标签从创建到显示 等过程中 经历的周期 -->
      <button @click="isShow = true">添加</button>
      <button @click="isShow = false">删除</button>
      <hello-world v-if="isShow"></hello-world>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'
  export default {
    components:{HelloWorld},
    data() {
      return {
        isShow: false, //是否显示
      }
    },
  }
</script>

<style lang="scss"
HelloWorld scoped>

</style>